<!--
Copyright (c) 2019-2026, Hossein Moein
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
  notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
  notice, this list of conditions and the following disclaimer in the
  documentation and/or other materials provided with the distribution.
* Neither the name of Hossein Moein and/or the DataFrame nor the
  names of its contributors may be used to endorse or promote products
  derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL Hossein Moein BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<!DOCTYPE html>
<html style="margin:0; padding:0; height:100%;">

<head>
<style>
body {
  background-image: linear-gradient(Azure, AliceBlue, GhostWhite, WhiteSmoke);
}
</style>
</head>

<body style="font-family: Georgia, serif; margin:0; padding:0; height:100%;">
  <font size="+3">&#8592;</font> <a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/DataFrame.html">Back to Documentations</a><BR><BR>
  
  <table border="1">

    <tr bgcolor="lightblue">
        <th>Signature</th> <th>Description</th> <th>Parameters</th>

    </tr>
    <tr bgcolor="Azure">
      <td bgcolor="blue"> <font color="white">
        <PRE><B>
template&lt;typename T, typename F, typename ... Ts&gt;
DataFrame
get_data_by_sel(const char *name,
                F &amp;sel_functor) const;
        </B></PRE></font>
      </td>
      <td>
        This method does Boolean filtering selection via the sel_functor (e.g. a functor, function, or lambda). It returns a new DataFrame. Each element of the named column along with its corresponding index is passed to the sel_functor. If sel_functor returns true, that index is selected and all the elements of all column for that index will be included in the returned DataFrame.<BR>
The signature of sel_fucntor:<BR>
        <I><PRE>
    bool ()(const IndexType &, const T &)
        </PRE></I>
        <B>NOTE</B> If the selection logic results in empty column(s), the result empty columns will _not_ be padded with NaN's. You can always call make_consistent() on the original or result DataFrame to make all columns into consistent length<BR>
      </td>
      <td width="30%">
        <B>T</B>: Type of the named column<BR>
        <B>F</B>: Type of the selecting functor<BR>
        <B>Ts</B>: The list of types for all columns. A type should be specified only once<BR>
        <B>name</B>: Name of the data column<BR>
        <B>sel_functor</B>: A reference to the selecting functor<BR>
      </td>
    </tr>

    </tr>
    <tr bgcolor="Azure">
      <td bgcolor="blue"> <font color="white">
        <PRE><B>
template&lt;typename T, typename F, typename ... Ts&gt;
PtrView
get_view_by_sel(const char *name,
                F &amp;sel_functor);
        </B></PRE></font>
      </td>
      <td>
        This is identical with above get_data_by_sel(), but:<BR>
        <OL>
        <LI>The result is a view</LI>
        <LI>Since the result is a view, you cannot call make_consistent() on the result.</LI>
        </OL>
        <B>NOTE</B>: There are certain operations that you cannot do with a view. For example, you cannot add/delete columns, etc.<BR>
      </td>
      <td width="30%">
        <B>T</B>: Type of the named column<BR>
        <B>F</B>: Type of the selecting functor<BR>
        <B>Ts</B>: The list of types for all columns. A type should be specified only once<BR>
        <B>name</B>: Name of the data column<BR>
        <B>sel_functor</B>: A reference to the selecting functor<BR>
      </td>
    </tr>

    </tr>
    <tr bgcolor="Azure">
      <td bgcolor="blue"> <font color="white">
        <PRE><B>
template&lt;typename T, typename F, typename ... Ts&gt;
ConstPtrView
get_view_by_sel(const char *name,
                F &amp;sel_functor) const;
        </B></PRE></font>
      </td>
      <td>
          Same as above view, but it returns a <I>const</I> view. You can not change data in const views. But if the data is changed in the original DataFrame or through another view, it is reflected in the const view.       
      </td>
      <td width="30%">
        <B>T</B>: Type of the named column<BR>
        <B>F</B>: Type of the selecting functor<BR>
        <B>Ts</B>: The list of types for all columns. A type should be specified only once<BR>
        <B>name</B>: Name of the data column<BR>
        <B>sel_functor</B>: A reference to the selecting functor<BR>
      </td>
    </tr>

    <tr bgcolor="Azure">
      <td bgcolor="blue"> <font color="white">
        <PRE><B>
template&lt;typename T1, typename T2, typename F,
         typename ... Ts&gt;
DataFrame
get_data_by_sel(const char *name1,
                const char *name2,
                F &amp;sel_functor) const;
        </B></PRE></font>
      </td>
      <td>
        This does the same function as above get_data_be_sel() but operating on two columns.<BR>
        The signature of sel_fucntor:<BR>
        <I><PRE>
    bool ()(const IndexType &, const T1 &, const T2 &)
        </PRE></I>
      </td>
      <td width="30%">
        <B>T1</B>: Type of the first named column<BR>
        <B>T2</B>: Type of the second named column<BR>
        <B>F</B>: Type of the selecting functor<BR>
        <B>Ts</B>: The list of types for all columns. A type should be specified only once<BR>
        <B>name1</B>: Name of the first data column<BR>
        <B>name2</B>: Name of the second data column<BR>
        <B>sel_functor</B>: A reference to the selecting functor<BR>
      </td>
    </tr>

    <tr bgcolor="Azure">
      <td bgcolor="blue"> <font color="white">
        <PRE><B>
template&lt;typename T1, typename T2, typename F,
          typename ... Ts&gt;
PtrView
get_view_by_sel(const char *name1,
                const char *name2,
                F &amp;sel_functor);
        </B></PRE></font>
      </td>
      <td>
        This is identical with above get_data_by_sel(), but:<BR>
        <OL>
        <LI>The result is a view</LI>
        <LI>Since the result is a view, you cannot call make_consistent() on the result.</LI>
        </OL>
        <B>NOTE</B>: There are certain operations that you cannot do with a view. For example, you cannot add/delete columns, etc.<BR>
      </td>
      <td width="30%">
        <B>T1</B>: Type of the first named column<BR>
        <B>T2</B>: Type of the second named column<BR>
        <B>F</B>: Type of the selecting functor<BR>
        <B>Ts</B>: The list of types for all columns. A type should be specified only once<BR>
        <B>name1</B>: Name of the first data column<BR>
        <B>name2</B>: Name of the second data column<BR>
        <B>sel_functor</B>: A reference to the selecting functor<BR>
      </td>
    </tr>

    <tr bgcolor="Azure">
      <td bgcolor="blue"> <font color="white">
        <PRE><B>
template&lt;typename T1, typename T2, typename F,
          typename ... Ts&gt;
ConstPtrView
get_view_by_sel(const char *name1,
                const char *name2,
                F &amp;sel_functor) const;
        </B></PRE></font>
      </td>
      <td>
          Same as above view, but it returns a <I>const</I> view. You can not change data in const views. But if the data is changed in the original DataFrame or through another view, it is reflected in the const view.       
      </td>
      <td width="30%">
        <B>T1</B>: Type of the first named column<BR>
        <B>T2</B>: Type of the second named column<BR>
        <B>F</B>: Type of the selecting functor<BR>
        <B>Ts</B>: The list of types for all columns. A type should be specified only once<BR>
        <B>name1</B>: Name of the first data column<BR>
        <B>name2</B>: Name of the second data column<BR>
        <B>sel_functor</B>: A reference to the selecting functor<BR>
      </td>
    </tr>

    <tr bgcolor="Azure">
      <td bgcolor="blue"> <font color="white">
        <PRE><B>
template&lt;typename T1, typename T2, typename T3,
         typename F, typename ... Ts&gt;
DataFrame
get_data_by_sel(const char *name1,
                const char *name2,
                const char *name3,
                F &amp;sel_functor) const;
        </B></PRE></font>
      </td>
      <td>
        This does the same function as above get_data_be_sel() but operating on three columns.<BR>
        The signature of sel_fucntor:<BR>
        <I><PRE>
    bool ()(const IndexType &, const T1 &, const T2 &, const T3 &)
        </PRE></I>
      </td>
      <td width="30%">
        <B>T1</B>: Type of the first named column<BR>
        <B>T2</B>: Type of the second named column<BR>
        <B>T3</B>: Type of the third named column<BR>
        <B>F</B>: Type of the selecting functor<BR>
        <B>Ts</B>: The list of types for all columns. A type should be specified only once<BR>
        <B>name1</B>: Name of the first data column<BR>
        <B>name2</B>: Name of the second data column<BR>
        <B>name3</B>: Name of the third data column<BR>
        <B>sel_functor</B>: A reference to the selecting functor<BR>
      </td>
    </tr>

    <tr bgcolor="Azure">
      <td bgcolor="blue"> <font color="white">
        <PRE><B>
template&lt;typename T1, typename T2, typename T3,
         typename F, typename ... Ts&gt;
PtrView
get_view_by_sel(const char *name1,
                const char *name2,
                const char *name3,
                F &amp;sel_functor);
        </B></PRE></font>
      </td>
      <td>
        This is identical with above get_data_by_sel(), but:<BR>
        <OL>
        <LI>The result is a view</LI>
        <LI>Since the result is a view, you cannot call make_consistent() on the result.</LI>
        </OL>
        <B>NOTE</B>: There are certain operations that you cannot do with a view. For example, you cannot add/delete columns, etc.<BR>
      </td>
      <td width="30%">
        <B>T1</B>: Type of the first named column<BR>
        <B>T2</B>: Type of the second named column<BR>
        <B>T3</B>: Type of the third named column<BR>
        <B>F</B>: Type of the selecting functor<BR>
        <B>Ts</B>: The list of types for all columns. A type should be specified only once<BR>
        <B>name1</B>: Name of the first data column<BR>
        <B>name2</B>: Name of the second data column<BR>
        <B>name3</B>: Name of the third data column<BR>
        <B>sel_functor</B>: A reference to the selecting functor<BR>
      </td>
    </tr>

    <tr bgcolor="Azure">
      <td bgcolor="blue"> <font color="white">
        <PRE><B>
template&lt;typename T1, typename T2, typename T3,
         typename F, typename ... Ts&gt;
ConstPtrView
get_view_by_sel(const char *name1,
                const char *name2,
                const char *name3,
                F &amp;sel_functor) const;
        </B></PRE></font>
      </td>
      <td>
          Same as above view, but it returns a <I>const</I> view. You can not change data in const views. But if the data is changed in the original DataFrame or through another view, it is reflected in the const view.       
      </td>
      <td width="30%">
        <B>T1</B>: Type of the first named column<BR>
        <B>T2</B>: Type of the second named column<BR>
        <B>T3</B>: Type of the third named column<BR>
        <B>F</B>: Type of the selecting functor<BR>
        <B>Ts</B>: The list of types for all columns. A type should be specified only once<BR>
        <B>name1</B>: Name of the first data column<BR>
        <B>name2</B>: Name of the second data column<BR>
        <B>name3</B>: Name of the third data column<BR>
        <B>sel_functor</B>: A reference to the selecting functor<BR>
      </td>
    </tr>

    <tr bgcolor="Azure">
      <td bgcolor="blue"> <font color="white">
        <PRE><B>
template&lt;typename T1, typename T2,
         typename T3, typename T4,
         typename F, typename ... Ts&gt;
DataFrame
get_data_by_sel(const char *name1,
                const char *name2,
                const char *name3,
                const char *name4,
                F &amp;sel_functor) const;
        </B></PRE></font>
      </td>
      <td>
        This does the same function as above get_data_be_sel() but operating on four columns.<BR>
        The signature of sel_fucntor:<BR>
        <I><PRE>
    bool ()(const IndexType &, const T1 &, const T2 &, const T3 &, const T4 &)
        </PRE></I>
      </td>
      <td width="30%">
        <B>T1</B>: Type of the first named column<BR>
        <B>T2</B>: Type of the second named column<BR>
        <B>T3</B>: Type of the third named column<BR>
        <B>T4</B>: Type of the fourth named column<BR>
        <B>F</B>: Type of the selecting functor<BR>
        <B>Ts</B>: The list of types for all columns. A type should be specified only once<BR>
        <B>name1</B>: Name of the first data column<BR>
        <B>name2</B>: Name of the second data column<BR>
        <B>name3</B>: Name of the third data column<BR>
        <B>name4</B>: Name of the fourth data column<BR>
        <B>sel_functor</B>: A reference to the selecting functor<BR>
      </td>
    </tr>

    <tr bgcolor="Azure">
      <td bgcolor="blue"> <font color="white">
        <PRE><B>
template&lt;typename T1, typename T2,
         typename T3, typename T4,
         typename F, typename ... Ts&gt;
PtrView
get_view_by_sel(const char *name1,
                const char *name2,
                const char *name3,
                const char *name4,
                F &amp;sel_functor);
        </B></PRE></font>
      </td>
      <td>
        This is identical with above get_data_by_sel(), but:<BR>
        <OL>
        <LI>The result is a view</LI>
        <LI>Since the result is a view, you cannot call make_consistent() on the result.</LI>
        </OL>
        <B>NOTE</B>: There are certain operations that you cannot do with a view. For example, you cannot add/delete columns, etc.<BR>
      </td>
      <td width="30%">
        <B>T1</B>: Type of the first named column<BR>
        <B>T2</B>: Type of the second named column<BR>
        <B>T3</B>: Type of the third named column<BR>
        <B>T4</B>: Type of the fourth named column<BR>
        <B>F</B>: Type of the selecting functor<BR>
        <B>Ts</B>: The list of types for all columns. A type should be specified only once<BR>
        <B>name1</B>: Name of the first data column<BR>
        <B>name2</B>: Name of the second data column<BR>
        <B>name3</B>: Name of the third data column<BR>
        <B>name4</B>: Name of the fourth data column<BR>
        <B>sel_functor</B>: A reference to the selecting functor<BR>
      </td>
    </tr>

    <tr bgcolor="Azure">
      <td bgcolor="blue"> <font color="white">
        <PRE><B>
template&lt;typename T1, typename T2,
         typename T3, typename T4,
         typename F, typename ... Ts&gt;
ConstPtrView
get_view_by_sel(const char *name1,
                const char *name2,
                const char *name3,
                const char *name4,
                F &amp;sel_functor) const;
        </B></PRE></font>
      </td>
      <td>
          Same as above view, but it returns a <I>const</I> view. You can not change data in const views. But if the data is changed in the original DataFrame or through another view, it is reflected in the const view.       
      </td>
      <td width="30%">
        <B>T1</B>: Type of the first named column<BR>
        <B>T2</B>: Type of the second named column<BR>
        <B>T3</B>: Type of the third named column<BR>
        <B>T4</B>: Type of the fourth named column<BR>
        <B>F</B>: Type of the selecting functor<BR>
        <B>Ts</B>: The list of types for all columns. A type should be specified only once<BR>
        <B>name1</B>: Name of the first data column<BR>
        <B>name2</B>: Name of the second data column<BR>
        <B>name3</B>: Name of the third data column<BR>
        <B>name4</B>: Name of the fourth data column<BR>
        <B>sel_functor</B>: A reference to the selecting functor<BR>
      </td>
    </tr>

    <tr bgcolor="Azure">
      <td bgcolor="blue"> <font color="white">
        <PRE><B>
template&lt;typename T1, typename T2,
         typename T3, typename T4,
         typename T5,
         typename F, typename ... Ts&gt;
DataFrame
get_data_by_sel(const char *name1,
                const char *name2,
                const char *name3,
                const char *name4,
                const char *name5,
                F &amp;sel_functor) const;
        </B></PRE></font>
      </td>
      <td>
        This does the same function as above get_data_be_sel() but operating on five columns.<BR>
        The signature of sel_fucntor:<BR>
        <I><PRE>
    bool ()(const IndexType &,
            const T1 &, const T2 &, const T3 &, const T4 &, const T5 &)
        </PRE></I>
      </td>
      <td width="30%">
        <B>T1</B>: Type of the first named column<BR>
        <B>T2</B>: Type of the second named column<BR>
        <B>T3</B>: Type of the third named column<BR>
        <B>T4</B>: Type of the fourth named column<BR>
        <B>T5</B>: Type of the fifth named column<BR>
        <B>F</B>: Type of the selecting functor<BR>
        <B>Ts</B>: The list of types for all columns. A type should be specified only once<BR>
        <B>name1</B>: Name of the first data column<BR>
        <B>name2</B>: Name of the second data column<BR>
        <B>name3</B>: Name of the third data column<BR>
        <B>name4</B>: Name of the fourth data column<BR>
        <B>name5</B>: Name of the fifth data column<BR>
        <B>sel_functor</B>: A reference to the selecting functor<BR>
      </td>
    </tr>

    <tr bgcolor="Azure">
      <td bgcolor="blue"> <font color="white">
        <PRE><B>
template&lt;typename T1, typename T2,
         typename T3, typename T4,
         typename T5,
         typename F, typename ... Ts&gt;
PtrView
get_view_by_sel(const char *name1,
                const char *name2,
                const char *name3,
                const char *name4,
                const char *name5,
                F &amp;sel_functor);
        </B></PRE></font>
      </td>
      <td>
        This is identical with above get_data_by_sel(), but:<BR>
        <OL>
        <LI>The result is a view</LI>
        <LI>Since the result is a view, you cannot call make_consistent() on the result.</LI>
        </OL>
        <B>NOTE</B>: There are certain operations that you cannot do with a view. For example, you cannot add/delete columns, etc.<BR>
      </td>
      <td width="30%">
        <B>T1</B>: Type of the first named column<BR>
        <B>T2</B>: Type of the second named column<BR>
        <B>T3</B>: Type of the third named column<BR>
        <B>T4</B>: Type of the fourth named column<BR>
        <B>T5</B>: Type of the fifth named column<BR>
        <B>F</B>: Type of the selecting functor<BR>
        <B>Ts</B>: The list of types for all columns. A type should be specified only once<BR>
        <B>name1</B>: Name of the first data column<BR>
        <B>name2</B>: Name of the second data column<BR>
        <B>name3</B>: Name of the third data column<BR>
        <B>name4</B>: Name of the fourth data column<BR>
        <B>name5</B>: Name of the fifth data column<BR>
        <B>sel_functor</B>: A reference to the selecting functor<BR>
      </td>
    </tr>

    <tr bgcolor="Azure">
      <td bgcolor="blue"> <font color="white">
        <PRE><B>
template&lt;typename T1, typename T2,
         typename T3, typename T4,
         typename T5,
         typename F, typename ... Ts&gt;
ConstPtrView
get_view_by_sel(const char *name1,
                const char *name2,
                const char *name3,
                const char *name4,
                const char *name5,
                F &amp;sel_functor) const;
        </B></PRE></font>
      </td>
      <td>
          Same as above view, but it returns a <I>const</I> view. You can not change data in const views. But if the data is changed in the original DataFrame or through another view, it is reflected in the const view.       
      </td>
      <td width="30%">
        <B>T1</B>: Type of the first named column<BR>
        <B>T2</B>: Type of the second named column<BR>
        <B>T3</B>: Type of the third named column<BR>
        <B>T4</B>: Type of the fourth named column<BR>
        <B>T5</B>: Type of the fifth named column<BR>
        <B>F</B>: Type of the selecting functor<BR>
        <B>Ts</B>: The list of types for all columns. A type should be specified only once<BR>
        <B>name1</B>: Name of the first data column<BR>
        <B>name2</B>: Name of the second data column<BR>
        <B>name3</B>: Name of the third data column<BR>
        <B>name4</B>: Name of the fourth data column<BR>
        <B>name5</B>: Name of the fifth data column<BR>
        <B>sel_functor</B>: A reference to the selecting functor<BR>
      </td>
    </tr>

  </table>

<!-- HTML generated using hilite.me --><div style="background: #ffffff00; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #008800; font-weight: bold">static</span> <span style="color: #333399; font-weight: bold">void</span> <span style="color: #0066BB; font-weight: bold">test_get_data_by_sel</span>()  {

    std<span style="color: #333333">::</span>cout <span style="color: #333333">&lt;&lt;</span> <span style="background-color: #fff0f0">&quot;</span><span style="color: #666666; font-weight: bold; background-color: #fff0f0">\n</span><span style="background-color: #fff0f0">Testing get_data_by_sel() ...&quot;</span> <span style="color: #333333">&lt;&lt;</span> std<span style="color: #333333">::</span>endl;

    std<span style="color: #333333">::</span>vector<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">unsigned</span> <span style="color: #333399; font-weight: bold">long</span><span style="color: #333333">&gt;</span>  idx <span style="color: #333333">=</span> { <span style="color: #0000DD; font-weight: bold">123450</span>, <span style="color: #0000DD; font-weight: bold">123451</span>, <span style="color: #0000DD; font-weight: bold">123452</span>, <span style="color: #0000DD; font-weight: bold">123453</span>, <span style="color: #0000DD; font-weight: bold">123454</span>, <span style="color: #0000DD; font-weight: bold">123455</span>, <span style="color: #0000DD; font-weight: bold">123456</span> };
    std<span style="color: #333333">::</span>vector<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span> d1 <span style="color: #333333">=</span> { <span style="color: #0000DD; font-weight: bold">1</span>, <span style="color: #0000DD; font-weight: bold">2</span>, <span style="color: #0000DD; font-weight: bold">3</span>, <span style="color: #0000DD; font-weight: bold">4</span>, <span style="color: #0000DD; font-weight: bold">5</span>, <span style="color: #0000DD; font-weight: bold">6</span>, <span style="color: #0000DD; font-weight: bold">7</span> };
    std<span style="color: #333333">::</span>vector<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span> d2 <span style="color: #333333">=</span> { <span style="color: #0000DD; font-weight: bold">8</span>, <span style="color: #0000DD; font-weight: bold">9</span>, <span style="color: #0000DD; font-weight: bold">10</span>, <span style="color: #0000DD; font-weight: bold">11</span>, <span style="color: #0000DD; font-weight: bold">12</span>, <span style="color: #0000DD; font-weight: bold">13</span>, <span style="color: #0000DD; font-weight: bold">14</span> };
    std<span style="color: #333333">::</span>vector<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span> d3 <span style="color: #333333">=</span> { <span style="color: #0000DD; font-weight: bold">15</span>, <span style="color: #0000DD; font-weight: bold">16</span>, <span style="color: #0000DD; font-weight: bold">17</span>, <span style="color: #0000DD; font-weight: bold">18</span>, <span style="color: #0000DD; font-weight: bold">19</span>, <span style="color: #0000DD; font-weight: bold">20</span>, <span style="color: #0000DD; font-weight: bold">21</span> };
    std<span style="color: #333333">::</span>vector<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span> d4 <span style="color: #333333">=</span> { <span style="color: #0000DD; font-weight: bold">22</span>, <span style="color: #0000DD; font-weight: bold">23</span>, <span style="color: #0000DD; font-weight: bold">24</span>, <span style="color: #0000DD; font-weight: bold">25</span> };
    std<span style="color: #333333">::</span>vector<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span> s1 <span style="color: #333333">=</span> { <span style="background-color: #fff0f0">&quot;11&quot;</span>, <span style="background-color: #fff0f0">&quot;22&quot;</span>, <span style="background-color: #fff0f0">&quot;33&quot;</span>, <span style="background-color: #fff0f0">&quot;ee&quot;</span>, <span style="background-color: #fff0f0">&quot;ff&quot;</span>, <span style="background-color: #fff0f0">&quot;gg&quot;</span>, <span style="background-color: #fff0f0">&quot;ll&quot;</span> };
    MyDataFrame         df;

    df.load_data(std<span style="color: #333333">::</span>move(idx),
                 std<span style="color: #333333">::</span>make_pair(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>, d1),
                 std<span style="color: #333333">::</span>make_pair(<span style="background-color: #fff0f0">&quot;col_2&quot;</span>, d2),
                 std<span style="color: #333333">::</span>make_pair(<span style="background-color: #fff0f0">&quot;col_3&quot;</span>, d3),
                 std<span style="color: #333333">::</span>make_pair(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>, s1));
    df.load_column(<span style="background-color: #fff0f0">&quot;col_4&quot;</span>, std<span style="color: #333333">::</span>move(d4), nan_policy<span style="color: #333333">::</span>dont_pad_with_nans);

    <span style="color: #008800; font-weight: bold">auto</span>    functor <span style="color: #333333">=</span>
        [](<span style="color: #008800; font-weight: bold">const</span> <span style="color: #333399; font-weight: bold">unsigned</span> <span style="color: #333399; font-weight: bold">long</span> <span style="color: #333333">&amp;</span>, <span style="color: #008800; font-weight: bold">const</span> <span style="color: #333399; font-weight: bold">double</span> <span style="color: #333333">&amp;</span>val)<span style="color: #333333">-&gt;</span> <span style="color: #333399; font-weight: bold">bool</span> {
            <span style="color: #008800; font-weight: bold">return</span> (val <span style="color: #333333">&gt;=</span> <span style="color: #0000DD; font-weight: bold">5</span>);
        };
    <span style="color: #008800; font-weight: bold">auto</span>    result <span style="color: #333333">=</span>
        df.get_data_by_sel<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span>, decltype(functor), <span style="color: #333399; font-weight: bold">double</span>, std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>, functor);

    assert(result.get_index().size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">3</span>);
    assert(result.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>).size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">3</span>);
    assert(result.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>).size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">3</span>);
    assert(result.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_4&quot;</span>).size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">0</span>);
    assert(result.get_index()[<span style="color: #0000DD; font-weight: bold">0</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">123454</span>);
    assert(result.get_index()[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">123456</span>);
    assert(result.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_2&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">13</span>);
    assert(result.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;gg&quot;</span>);
    assert(result.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>)[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;ll&quot;</span>);
    assert(result.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">6</span>);
    assert(result.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>)[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">7</span>);

    <span style="color: #008800; font-weight: bold">auto</span>    functor2 <span style="color: #333333">=</span>
        [](<span style="color: #008800; font-weight: bold">const</span> <span style="color: #333399; font-weight: bold">unsigned</span> <span style="color: #333399; font-weight: bold">long</span> <span style="color: #333333">&amp;</span>,
           <span style="color: #008800; font-weight: bold">const</span> <span style="color: #333399; font-weight: bold">double</span> <span style="color: #333333">&amp;</span>val1,
           <span style="color: #008800; font-weight: bold">const</span> <span style="color: #333399; font-weight: bold">double</span> <span style="color: #333333">&amp;</span>val2,
           <span style="color: #008800; font-weight: bold">const</span> std<span style="color: #333333">::</span>string <span style="color: #333333">&amp;</span>val3)<span style="color: #333333">-&gt;</span> <span style="color: #333399; font-weight: bold">bool</span> {
            <span style="color: #008800; font-weight: bold">return</span> (val1 <span style="color: #333333">&gt;=</span> <span style="color: #0000DD; font-weight: bold">5</span> <span style="color: #333333">||</span> val2 <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">15</span> <span style="color: #333333">||</span> val3 <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;33&quot;</span>);
        };
    <span style="color: #008800; font-weight: bold">auto</span>    result2 <span style="color: #333333">=</span>
        df.get_data_by_sel<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span>, <span style="color: #333399; font-weight: bold">double</span>, std<span style="color: #333333">::</span>string, decltype(functor2), <span style="color: #333399; font-weight: bold">double</span>, std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>
            (<span style="background-color: #fff0f0">&quot;col_1&quot;</span>, <span style="background-color: #fff0f0">&quot;col_3&quot;</span>, <span style="background-color: #fff0f0">&quot;col_str&quot;</span>, functor2);

    assert(result2.get_index().size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">5</span>);
    assert(result2.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>).size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">5</span>);
    assert(result2.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>).size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">5</span>);
    assert(result2.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_4&quot;</span>).size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">2</span>);
    assert(result2.get_index()[<span style="color: #0000DD; font-weight: bold">0</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">123450</span>);
    assert(result2.get_index()[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">123454</span>);
    assert(result2.get_index()[<span style="color: #0000DD; font-weight: bold">4</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">123456</span>);
    assert(result2.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_2&quot;</span>)[<span style="color: #0000DD; font-weight: bold">0</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">8</span>);
    assert(result2.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_2&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">10</span>);
    assert(result2.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_2&quot;</span>)[<span style="color: #0000DD; font-weight: bold">3</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">13</span>);
    assert(result2.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_4&quot;</span>)[<span style="color: #0000DD; font-weight: bold">0</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">22</span>);
    assert(result2.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_4&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">24</span>);
    assert(result2.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>)[<span style="color: #0000DD; font-weight: bold">0</span>] <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;11&quot;</span>);
    assert(result2.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;33&quot;</span>);
    assert(result2.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>)[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;ff&quot;</span>);
    assert(result2.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>)[<span style="color: #0000DD; font-weight: bold">4</span>] <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;ll&quot;</span>);
    assert(result2.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>)[<span style="color: #0000DD; font-weight: bold">0</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">1</span>);
    assert(result2.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">3</span>);
    assert(result2.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>)[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">5</span>);

    std<span style="color: #333333">::</span>vector<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span> s2 <span style="color: #333333">=</span> { <span style="background-color: #fff0f0">&quot;aa&quot;</span>, <span style="background-color: #fff0f0">&quot;bb&quot;</span>, <span style="background-color: #fff0f0">&quot;cc&quot;</span>, <span style="background-color: #fff0f0">&quot;10&quot;</span>, <span style="background-color: #fff0f0">&quot;11&quot;</span>, <span style="background-color: #fff0f0">&quot;12&quot;</span>, <span style="background-color: #fff0f0">&quot;14&quot;</span> };

    df.load_column(<span style="background-color: #fff0f0">&quot;col_str2&quot;</span>, s2);

    <span style="color: #008800; font-weight: bold">auto</span>    functor3 <span style="color: #333333">=</span>
        [](<span style="color: #008800; font-weight: bold">const</span> <span style="color: #333399; font-weight: bold">unsigned</span> <span style="color: #333399; font-weight: bold">long</span> <span style="color: #333333">&amp;</span>,
           <span style="color: #008800; font-weight: bold">const</span> <span style="color: #333399; font-weight: bold">double</span> <span style="color: #333333">&amp;</span>val1,
           <span style="color: #008800; font-weight: bold">const</span> <span style="color: #333399; font-weight: bold">double</span> <span style="color: #333333">&amp;</span>,
           <span style="color: #008800; font-weight: bold">const</span> <span style="color: #333399; font-weight: bold">double</span> <span style="color: #333333">&amp;</span>val3,
           <span style="color: #008800; font-weight: bold">const</span> std<span style="color: #333333">::</span>string <span style="color: #333333">&amp;</span>,
           <span style="color: #008800; font-weight: bold">const</span> std<span style="color: #333333">::</span>string <span style="color: #333333">&amp;</span>val5)<span style="color: #333333">-&gt;</span> <span style="color: #333399; font-weight: bold">bool</span> {
            <span style="color: #008800; font-weight: bold">return</span> (val1 <span style="color: #333333">&gt;=</span> <span style="color: #0000DD; font-weight: bold">5</span> <span style="color: #333333">||</span> val3 <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">15</span> <span style="color: #333333">||</span> val5 <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;cc&quot;</span>);
        };
    <span style="color: #008800; font-weight: bold">auto</span>    result3 <span style="color: #333333">=</span>
        df.get_data_by_sel<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span>,
                           <span style="color: #333399; font-weight: bold">double</span>,
                           <span style="color: #333399; font-weight: bold">double</span>,
                           std<span style="color: #333333">::</span>string,
                           std<span style="color: #333333">::</span>string,
                           decltype(functor3),
                           <span style="color: #333399; font-weight: bold">double</span>, std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>
            (<span style="background-color: #fff0f0">&quot;col_1&quot;</span>, <span style="background-color: #fff0f0">&quot;col_2&quot;</span>, <span style="background-color: #fff0f0">&quot;col_3&quot;</span>, <span style="background-color: #fff0f0">&quot;col_str&quot;</span>, <span style="background-color: #fff0f0">&quot;col_str2&quot;</span>, functor3);

    <span style="color: #008800; font-weight: bold">const</span> MyDataFrame   <span style="color: #333333">&amp;</span>const_df <span style="color: #333333">=</span> df;

    <span style="color: #008800; font-weight: bold">auto</span>    result4 <span style="color: #333333">=</span>
        df.get_view_by_sel<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span>,
                           <span style="color: #333399; font-weight: bold">double</span>,
                           <span style="color: #333399; font-weight: bold">double</span>,
                           std<span style="color: #333333">::</span>string,
                           std<span style="color: #333333">::</span>string,
                           decltype(functor3),
                           <span style="color: #333399; font-weight: bold">double</span>, std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>
            (<span style="background-color: #fff0f0">&quot;col_1&quot;</span>, <span style="background-color: #fff0f0">&quot;col_2&quot;</span>, <span style="background-color: #fff0f0">&quot;col_3&quot;</span>, <span style="background-color: #fff0f0">&quot;col_str&quot;</span>, <span style="background-color: #fff0f0">&quot;col_str2&quot;</span>, functor3);
    <span style="color: #008800; font-weight: bold">auto</span>    const_result4 <span style="color: #333333">=</span>
        const_df.get_view_by_sel<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span>,
                                 <span style="color: #333399; font-weight: bold">double</span>,
                                 <span style="color: #333399; font-weight: bold">double</span>,
                                 std<span style="color: #333333">::</span>string,
                                 std<span style="color: #333333">::</span>string,
                                 decltype(functor3),
                                 <span style="color: #333399; font-weight: bold">double</span>, std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>
            (<span style="background-color: #fff0f0">&quot;col_1&quot;</span>, <span style="background-color: #fff0f0">&quot;col_2&quot;</span>, <span style="background-color: #fff0f0">&quot;col_3&quot;</span>, <span style="background-color: #fff0f0">&quot;col_str&quot;</span>, <span style="background-color: #fff0f0">&quot;col_str2&quot;</span>, functor3);

    assert(result3.get_index().size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">5</span>);
    assert(result4.get_index().size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">5</span>);
    assert(result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>).size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">5</span>);
    assert(result4.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>).size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">5</span>);
    assert(result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_2&quot;</span>)[<span style="color: #0000DD; font-weight: bold">3</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">13</span>);
    assert(result4.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_2&quot;</span>)[<span style="color: #0000DD; font-weight: bold">3</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">13</span>);
    assert(result3.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>)[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;ff&quot;</span>);
    assert(result4.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>)[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;ff&quot;</span>);
    assert(result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>)[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">5</span>);
    assert(result4.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>)[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">5</span>);

    assert(const_result4.get_index().size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">5</span>);
    assert(const_result4.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>).size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">5</span>);
    assert(const_result4.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_2&quot;</span>)[<span style="color: #0000DD; font-weight: bold">3</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">13</span>);
    assert(const_result4.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>)[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;ff&quot;</span>);
    assert(const_result4.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>)[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">5</span>);
}

<span style="color: #888888">// -----------------------------------------------------------------------------</span>

<span style="color: #008800; font-weight: bold">static</span> <span style="color: #333399; font-weight: bold">void</span> <span style="color: #0066BB; font-weight: bold">test_get_view_by_sel</span>()  {

    std<span style="color: #333333">::</span>cout <span style="color: #333333">&lt;&lt;</span> <span style="background-color: #fff0f0">&quot;</span><span style="color: #666666; font-weight: bold; background-color: #fff0f0">\n</span><span style="background-color: #fff0f0">Testing get_view_by_sel() ...&quot;</span> <span style="color: #333333">&lt;&lt;</span> std<span style="color: #333333">::</span>endl;

    std<span style="color: #333333">::</span>vector<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">unsigned</span> <span style="color: #333399; font-weight: bold">long</span><span style="color: #333333">&gt;</span>  idx <span style="color: #333333">=</span> { <span style="color: #0000DD; font-weight: bold">123450</span>, <span style="color: #0000DD; font-weight: bold">123451</span>, <span style="color: #0000DD; font-weight: bold">123452</span>, <span style="color: #0000DD; font-weight: bold">123453</span>, <span style="color: #0000DD; font-weight: bold">123454</span>, <span style="color: #0000DD; font-weight: bold">123455</span>, <span style="color: #0000DD; font-weight: bold">123456</span> };
    std<span style="color: #333333">::</span>vector<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span> d1 <span style="color: #333333">=</span> { <span style="color: #0000DD; font-weight: bold">1</span>, <span style="color: #0000DD; font-weight: bold">2</span>, <span style="color: #0000DD; font-weight: bold">3</span>, <span style="color: #0000DD; font-weight: bold">4</span>, <span style="color: #0000DD; font-weight: bold">5</span>, <span style="color: #0000DD; font-weight: bold">6</span>, <span style="color: #0000DD; font-weight: bold">7</span> };
    std<span style="color: #333333">::</span>vector<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span> d2 <span style="color: #333333">=</span> { <span style="color: #0000DD; font-weight: bold">8</span>, <span style="color: #0000DD; font-weight: bold">9</span>, <span style="color: #0000DD; font-weight: bold">10</span>, <span style="color: #0000DD; font-weight: bold">11</span>, <span style="color: #0000DD; font-weight: bold">12</span>, <span style="color: #0000DD; font-weight: bold">13</span>, <span style="color: #0000DD; font-weight: bold">14</span> };
    std<span style="color: #333333">::</span>vector<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span> d3 <span style="color: #333333">=</span> { <span style="color: #0000DD; font-weight: bold">15</span>, <span style="color: #0000DD; font-weight: bold">16</span>, <span style="color: #0000DD; font-weight: bold">17</span>, <span style="color: #0000DD; font-weight: bold">18</span>, <span style="color: #0000DD; font-weight: bold">19</span>, <span style="color: #0000DD; font-weight: bold">20</span>, <span style="color: #0000DD; font-weight: bold">21</span> };
    std<span style="color: #333333">::</span>vector<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span> d4 <span style="color: #333333">=</span> { <span style="color: #0000DD; font-weight: bold">22</span>, <span style="color: #0000DD; font-weight: bold">23</span>, <span style="color: #0000DD; font-weight: bold">24</span>, <span style="color: #0000DD; font-weight: bold">25</span> };
    std<span style="color: #333333">::</span>vector<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span> s1 <span style="color: #333333">=</span> { <span style="background-color: #fff0f0">&quot;11&quot;</span>, <span style="background-color: #fff0f0">&quot;22&quot;</span>, <span style="background-color: #fff0f0">&quot;33&quot;</span>, <span style="background-color: #fff0f0">&quot;ee&quot;</span>, <span style="background-color: #fff0f0">&quot;ff&quot;</span>, <span style="background-color: #fff0f0">&quot;gg&quot;</span>, <span style="background-color: #fff0f0">&quot;ll&quot;</span> };
    MyDataFrame         df;

    df.load_data(std<span style="color: #333333">::</span>move(idx),
                 std<span style="color: #333333">::</span>make_pair(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>, d1),
                 std<span style="color: #333333">::</span>make_pair(<span style="background-color: #fff0f0">&quot;col_2&quot;</span>, d2),
                 std<span style="color: #333333">::</span>make_pair(<span style="background-color: #fff0f0">&quot;col_3&quot;</span>, d3),
                 std<span style="color: #333333">::</span>make_pair(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>, s1));
    df.load_column(<span style="background-color: #fff0f0">&quot;col_4&quot;</span>, std<span style="color: #333333">::</span>move(d4), nan_policy<span style="color: #333333">::</span>dont_pad_with_nans);

    <span style="color: #008800; font-weight: bold">const</span> MyDataFrame   <span style="color: #333333">&amp;</span>const_df <span style="color: #333333">=</span> df;
    <span style="color: #008800; font-weight: bold">auto</span>    functor <span style="color: #333333">=</span>
        [](<span style="color: #008800; font-weight: bold">const</span> <span style="color: #333399; font-weight: bold">unsigned</span> <span style="color: #333399; font-weight: bold">long</span> <span style="color: #333333">&amp;</span>, <span style="color: #008800; font-weight: bold">const</span> <span style="color: #333399; font-weight: bold">double</span> <span style="color: #333333">&amp;</span>val)<span style="color: #333333">-&gt;</span> <span style="color: #333399; font-weight: bold">bool</span> {
            <span style="color: #008800; font-weight: bold">return</span> (val <span style="color: #333333">&gt;=</span> <span style="color: #0000DD; font-weight: bold">5</span>);
        };
    <span style="color: #008800; font-weight: bold">auto</span>    result <span style="color: #333333">=</span>
        df.get_view_by_sel<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span>, decltype(functor), <span style="color: #333399; font-weight: bold">double</span>, std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>, functor);
    <span style="color: #008800; font-weight: bold">auto</span>    const_result <span style="color: #333333">=</span>
        const_df.get_view_by_sel<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span>, decltype(functor), <span style="color: #333399; font-weight: bold">double</span>, std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>, functor);

    result.shrink_to_fit<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span>, std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>();
    assert(result.get_index().size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">3</span>);
    assert(result.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>).size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">3</span>);
    assert(result.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>).size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">3</span>);
    assert(result.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_4&quot;</span>).size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">0</span>);
    assert(result.get_index()[<span style="color: #0000DD; font-weight: bold">0</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">123454</span>);
    assert(result.get_index()[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">123456</span>);
    assert(result.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_2&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">13</span>);
    assert(result.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;gg&quot;</span>);
    assert(result.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>)[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;ll&quot;</span>);
    assert(result.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">6</span>);
    assert(result.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>)[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">7</span>);

    assert(const_result.get_index().size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">3</span>);
    assert(const_result.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>).size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">3</span>);
    assert(const_result.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>).size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">3</span>);
    assert(const_result.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_4&quot;</span>).size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">0</span>);
    assert(const_result.get_index()[<span style="color: #0000DD; font-weight: bold">0</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">123454</span>);
    assert(const_result.get_index()[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">123456</span>);
    assert(const_result.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_2&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">13</span>);
    assert(const_result.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;gg&quot;</span>);
    assert(const_result.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>)[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;ll&quot;</span>);
    assert(const_result.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">6</span>);
    assert(const_result.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>)[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">7</span>);

    result.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">=</span> <span style="color: #0000DD; font-weight: bold">600</span>;
    assert(result.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">600</span>);
    assert(const_result.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">600</span>);
    assert(df.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>)[<span style="color: #0000DD; font-weight: bold">5</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">600</span>);

    <span style="color: #008800; font-weight: bold">auto</span>    functor2 <span style="color: #333333">=</span>
        [](<span style="color: #008800; font-weight: bold">const</span> <span style="color: #333399; font-weight: bold">unsigned</span> <span style="color: #333399; font-weight: bold">long</span> <span style="color: #333333">&amp;</span>,
           <span style="color: #008800; font-weight: bold">const</span> <span style="color: #333399; font-weight: bold">double</span> <span style="color: #333333">&amp;</span>val1,
           <span style="color: #008800; font-weight: bold">const</span> <span style="color: #333399; font-weight: bold">double</span> <span style="color: #333333">&amp;</span>val2)<span style="color: #333333">-&gt;</span> <span style="color: #333399; font-weight: bold">bool</span> {
            <span style="color: #008800; font-weight: bold">return</span> (val1 <span style="color: #333333">&gt;=</span> <span style="color: #0000DD; font-weight: bold">5</span> <span style="color: #333333">||</span> val2 <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">15</span>);
        };
    <span style="color: #008800; font-weight: bold">auto</span>    result2 <span style="color: #333333">=</span>
        df.get_view_by_sel<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span>,
                           <span style="color: #333399; font-weight: bold">double</span>,
                           decltype(functor2),
                           <span style="color: #333399; font-weight: bold">double</span>, std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>
            (<span style="background-color: #fff0f0">&quot;col_1&quot;</span>, <span style="background-color: #fff0f0">&quot;col_3&quot;</span>, functor2);
    <span style="color: #008800; font-weight: bold">auto</span>    const_result2 <span style="color: #333333">=</span>
        const_df.get_view_by_sel<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span>,
                                 <span style="color: #333399; font-weight: bold">double</span>,
                                 decltype(functor2),
                                 <span style="color: #333399; font-weight: bold">double</span>, std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>
            (<span style="background-color: #fff0f0">&quot;col_1&quot;</span>, <span style="background-color: #fff0f0">&quot;col_3&quot;</span>, functor2);

    <span style="color: #008800; font-weight: bold">auto</span>    functor3 <span style="color: #333333">=</span>
        [](<span style="color: #008800; font-weight: bold">const</span> <span style="color: #333399; font-weight: bold">unsigned</span> <span style="color: #333399; font-weight: bold">long</span> <span style="color: #333333">&amp;</span>,
           <span style="color: #008800; font-weight: bold">const</span> <span style="color: #333399; font-weight: bold">double</span> <span style="color: #333333">&amp;</span>val1,
           <span style="color: #008800; font-weight: bold">const</span> <span style="color: #333399; font-weight: bold">double</span> <span style="color: #333333">&amp;</span>val2,
           <span style="color: #008800; font-weight: bold">const</span> std<span style="color: #333333">::</span>string val3)<span style="color: #333333">-&gt;</span> <span style="color: #333399; font-weight: bold">bool</span> {
            <span style="color: #008800; font-weight: bold">return</span> (val1 <span style="color: #333333">&gt;=</span> <span style="color: #0000DD; font-weight: bold">5</span> <span style="color: #333333">||</span> val2 <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">15</span> <span style="color: #333333">||</span> val3 <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;33&quot;</span>);
        };
    <span style="color: #008800; font-weight: bold">auto</span>    result3 <span style="color: #333333">=</span>
        df.get_view_by_sel<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span>,
                           <span style="color: #333399; font-weight: bold">double</span>,
                           std<span style="color: #333333">::</span>string,
                           decltype(functor3),
                           <span style="color: #333399; font-weight: bold">double</span>, std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>
            (<span style="background-color: #fff0f0">&quot;col_1&quot;</span>, <span style="background-color: #fff0f0">&quot;col_3&quot;</span>, <span style="background-color: #fff0f0">&quot;col_str&quot;</span>, functor3);
    <span style="color: #008800; font-weight: bold">auto</span>    const_result3 <span style="color: #333333">=</span>
        const_df.get_view_by_sel<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span>,
                                 <span style="color: #333399; font-weight: bold">double</span>,
                                 std<span style="color: #333333">::</span>string,
                                 decltype(functor3),
                                 <span style="color: #333399; font-weight: bold">double</span>, std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>
            (<span style="background-color: #fff0f0">&quot;col_1&quot;</span>, <span style="background-color: #fff0f0">&quot;col_3&quot;</span>, <span style="background-color: #fff0f0">&quot;col_str&quot;</span>, functor3);

    assert(result3.get_index().size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">5</span>);
    assert(result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>).size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">5</span>);
    assert(result3.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>).size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">5</span>);
    assert(result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_4&quot;</span>).size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">2</span>);
    assert(result3.get_index()[<span style="color: #0000DD; font-weight: bold">0</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">123450</span>);
    assert(result3.get_index()[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">123454</span>);
    assert(result3.get_index()[<span style="color: #0000DD; font-weight: bold">4</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">123456</span>);
    assert(result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_2&quot;</span>)[<span style="color: #0000DD; font-weight: bold">0</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">8</span>);
    assert(result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_2&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">10</span>);
    assert(result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_2&quot;</span>)[<span style="color: #0000DD; font-weight: bold">3</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">13</span>);
    assert(result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_4&quot;</span>)[<span style="color: #0000DD; font-weight: bold">0</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">22</span>);
    assert(result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_4&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">24</span>);
    assert(result3.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>)[<span style="color: #0000DD; font-weight: bold">0</span>] <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;11&quot;</span>);
    assert(result3.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;33&quot;</span>);
    assert(result3.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>)[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;ff&quot;</span>);
    assert(result3.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>)[<span style="color: #0000DD; font-weight: bold">4</span>] <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;ll&quot;</span>);
    assert(result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>)[<span style="color: #0000DD; font-weight: bold">0</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">1</span>);
    assert(result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">3</span>);
    assert(result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>)[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">5</span>);

    assert(const_result3.get_index().size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">5</span>);
    assert(const_result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>).size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">5</span>);
    assert(const_result3.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>).size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">5</span>);
    assert(const_result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_4&quot;</span>).size() <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">2</span>);
    assert(const_result3.get_index()[<span style="color: #0000DD; font-weight: bold">0</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">123450</span>);
    assert(const_result3.get_index()[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">123454</span>);
    assert(const_result3.get_index()[<span style="color: #0000DD; font-weight: bold">4</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">123456</span>);
    assert(const_result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_2&quot;</span>)[<span style="color: #0000DD; font-weight: bold">0</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">8</span>);
    assert(const_result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_2&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">10</span>);
    assert(const_result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_2&quot;</span>)[<span style="color: #0000DD; font-weight: bold">3</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">13</span>);
    assert(const_result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_4&quot;</span>)[<span style="color: #0000DD; font-weight: bold">0</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">22</span>);
    assert(const_result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_4&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">24</span>);
    assert(const_result3.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>)[<span style="color: #0000DD; font-weight: bold">0</span>] <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;11&quot;</span>);
    assert(const_result3.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;33&quot;</span>);
    assert(const_result3.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>)[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;ff&quot;</span>);
    assert(const_result3.get_column<span style="color: #333333">&lt;</span>std<span style="color: #333333">::</span>string<span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_str&quot;</span>)[<span style="color: #0000DD; font-weight: bold">4</span>] <span style="color: #333333">==</span> <span style="background-color: #fff0f0">&quot;ll&quot;</span>);
    assert(const_result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>)[<span style="color: #0000DD; font-weight: bold">0</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">1</span>);
    assert(const_result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>)[<span style="color: #0000DD; font-weight: bold">1</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">3</span>);
    assert(const_result3.get_column<span style="color: #333333">&lt;</span><span style="color: #333399; font-weight: bold">double</span><span style="color: #333333">&gt;</span>(<span style="background-color: #fff0f0">&quot;col_1&quot;</span>)[<span style="color: #0000DD; font-weight: bold">2</span>] <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">5</span>);
}
</pre></div>

  <BR><img src="https://github.com/hosseinmoein/DataFrame/blob/master/docs/LionLookingUp.jpg?raw=true" alt="C++ DataFrame"
       width="200" height="200" style="float:right"/>

</body>
</html>

<!--
Local Variables:
mode:HTML
tab-width:4
c-basic-offset:4
End:
-->
